#
# @lc app=leetcode.cn id=455 lang=python
#
# [455] 分发饼干
#

# @lc code=start
class Solution(object):
    def findContentChildren(self, g, s):
        """
        :type g: List[int]
        :type s: List[int]
        :rtype: int
        """
        g.sort()
        s.sort()
        max_num = 0
        index = 0
        for i in range(len(s)):
            if index<len(g) and  g[index] <= s[i] :
                max_num+=1
                index += 1
        return max_num
        
# @lc code=end

